import { EKeyCode } from './Enum'

export default class Plane extends Laya.Script {

    constructor() { super(); }

    public level: number
    public isLive: boolean

    onEnable(): void {
        this.level = 1;
        this.isLive = true;
    }

    onUpdate(): void {

    }

    onTriggerEnter(other): void {
        switch (other.label) {
            case 'cBuff':
                this.level = Math.min(3, this.level + 1)
                console.log(this.level);
                break;
            case 'cEnemy':
                this.isLive = false;
                break
        }
    }

    onDisable(): void {

    }
}